#!/usr/bin/env bash

source /Users/vi/git/tool_sh/assist/global.sh

log_level=debug
if [ -f /Library/Preferences/com.apple.Bluetooth.plist ] ; then
    vlogi "please input $USER's passwd for sudo:"
    sudo rm /Library/Preferences/com.apple.Bluetooth.plist
    vlogi "finished rm /Library/Preferences/com.apple.Bluetooth.plist"
    vlogi "please restart your pc"
else
    vlogi "file does not exist, file_name: /Library/Preferences/com.apple.Bluetooth.plist"
fi

file_name=$HOME/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist
if [ -f $file_name ] ; then
    rm -rf $file_name 
    vlogi "Please restart your pc!"

else
    vlogi "file does not exist, file_name: $file_name"
fi

file_name=$HOME/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse.plist
if [ -f $file_name ] ; then
    rm -rf $file_name 
    vlogi "Please restart your pc!"

else
    vlogi "file does not exist, file_name: $file_name"
fi

